﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace CsharpWpfManual
{
    /// <summary>
    /// Webapitest.xaml 的交互逻辑
    /// </summary>
    public partial class Webapitest : Window
    {
        public Webapitest()
        {
            InitializeComponent();
            lst.ItemsSource = new List<string>()
            {
                "ZCPX.exe",
                "ZCPX.exe.config",
                "Xceed.Wpf.Toolkit.dll",
                "System.ValueTuple.xml",
                "Prism.pdb",
                "1.txt"
            };
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {

            //foreach(string filename in lst.ItemsSource)
            {
                DownFileInfo downFileInfo = new DownFileInfo()
                {
                    FileName= filename.Text,
                    UserID="chenzd",
                    Passwd="123qaz"
                };

                webapi.DownLoadFile(txturl.Text, downFileInfo);
            }

          
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            webapi.UpdateLoadFile(txturl.Text, uploadtxt.Text);
        }
    }
}
